package logic

import (
	"context"
	"homepage_srv/homepage"
	"homepage_srv/internal/dao"
	"homepage_srv/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type CarouselLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewCarouselLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CarouselLogic {
	return &CarouselLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 轮播图
func (l *CarouselLogic) Carousel(in *homepage.CarouselRequest) (*homepage.CarouselResponse, error) {
	carouselList := dao.CarouselList()
	return &homepage.CarouselResponse{
		List: carouselList,
	}, nil
}
